Skip to content

test(cli): cover bucket cors stdin source#102

Draft
overtrue wants to merge 1 commit intomainfrom
codex/cors-stdin-integration-gap
Draft

test(cli): cover bucket cors stdin source#102
overtrue wants to merge 1 commit intomainfrom
codex/cors-stdin-integration-gap

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

@overtrue overtrue commented Apr 9, 2026

Summary

This change adds focused integration coverage for the bucket CORS stdin input path that was introduced with the recent bucket CORS command work.

The recent CORS feature added support for rc bucket cors set <bucket> -, but the integration suite did not exercise that branch. That left a gap around piping configuration into the CLI, which is a user-facing path distinct from file-based input.

This patch keeps scope tight by adding a small helper for spawning rc with piped stdin inside the existing integration harness and one test that writes a JSON CORS configuration through stdin, applies it with bucket cors set, and then verifies through bucket cors list --json that the stored rule matches the expected normalized methods.

Validation

I attempted to run make pre-commit, but this repository does not contain a Makefile or a pre-commit target. I ran the documented repository checks directly instead:

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • cargo test -p rustfs-cli --features integration test_bucket_cors_set_accepts_stdin_source -- --nocapture

The new integration test follows the existing pattern of skipping when the S3 integration environment is not configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant